home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-18 | 73.1 KB | 2,145 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- S Y S T E M I N F O L I B R A R Y
- For Borland C
- Version 1.1
-
-
- (Revised May, 1994)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (C) 1994 By Paul Lapsansky
- ALL RIGHTS RESERVED
-
- i. CONTENTS
-
- i. CONTENTS. . . . . . . . . . . . . . . . . . . . . . 2
-
- I. INTRODUCTION. . . . . . . . . . . . . . . . . . . . 5
- A. What is supported . . . . . . . . . . . . . . . 5
- B. Registration. . . . . . . . . . . . . . . . . . 5
- C. Disclaimer. . . . . . . . . . . . . . . . . . . 5
-
- II. SYSTEM FUNCTIONS. . . . . . . . . . . . . . . . . . 6
-
- A. DISPLAY. . . . . . . . . . . . . . . . . . . . . 7
- 1. GETCRT. . . . . . . . . . . . . . . . . . . . 7
- 2. GETVESA . . . . . . . . . . . . . . . . . . . 7
- 3. GETVIDEO. . . . . . . . . . . . . . . . . . . 7
-
- B. DOS. . . . . . . . . . . . . . . . . . . . . . . 9
- 1. CHKANSI . . . . . . . . . . . . . . . . . . . 9
- 2. CHKAPPEND . . . . . . . . . . . . . . . . . . 9
- 3. CHKASSIGN . . . . . . . . . . . . . . . . . . 9
- 4. CHKDISPLAY. . . . . . . . . . . . . . . . . . 9
- 5. CHKDOSHIGH. . . . . . . . . . . . . . . . . .10
- 6. CHKDOSKEY . . . . . . . . . . . . . . . . . .10
- 7. CHKDRIVER . . . . . . . . . . . . . . . . . .10
- 8. CHKEGA. . . . . . . . . . . . . . . . . . . .10
- 9. CHKGRAFTABL . . . . . . . . . . . . . . . . .11
- 10. CHKGRAPHICS. . . . . . . . . . . . . . . . .11
- 11. CHKKEYB. . . . . . . . . . . . . . . . . . .11
- 12. CHKNLSFUNC . . . . . . . . . . . . . . . . .12
- 13. CHKPRINT . . . . . . . . . . . . . . . . . .12
- 14. CHKSHARE . . . . . . . . . . . . . . . . . .12
- 15. CHKSHELLB. . . . . . . . . . . . . . . . . .12
- 16. CHKXMA2EMS . . . . . . . . . . . . . . . . .13
- 17. GET4DOSV . . . . . . . . . . . . . . . . . .13
- 18. GETDOSOEM. . . . . . . . . . . . . . . . . .13
- 19. GETDOSV. . . . . . . . . . . . . . . . . . .13
- 20. GETDRDOSV. . . . . . . . . . . . . . . . . .14
-
- C. DRIVES. . . . . . . . . . . . . . . . . . . . .15
- 1. CDROM . . . . . . . . . . . . . . . . . . . .15
- 2. CHKREMOTE . . . . . . . . . . . . . . . . . .15
- 3. CHKREMOVABLE. . . . . . . . . . . . . . . . .15
- 4. GETAVAILDRVS. . . . . . . . . . . . . . . . .16
- 5. GETDRVINFO. . . . . . . . . . . . . . . . . .16
- 6. GETDRVSPACE . . . . . . . . . . . . . . . . .16
- 7. GETFLOPPY . . . . . . . . . . . . . . . . . .17
- 8. GETFLOPTYPE . . . . . . . . . . . . . . . . .17
- 9. ISCDROM . . . . . . . . . . . . . . . . . . .17
- 10. ISDBLSPACE . . . . . . . . . . . . . . . . .18
- 11. ISSTACKER. . . . . . . . . . . . . . . . . .18
-
- D. HARDWARE . . . . . . . . . . . . . . . . . . . .19
-
- - 2 -
-
- 1. BIOSDATE. . . . . . . . . . . . . . . . . . .19
- 2. CHKENHKEYB. . . . . . . . . . . . . . . . . .19
- 3. GETBUSTYPE. . . . . . . . . . . . . . . . . .19
- 4. GETCOM. . . . . . . . . . . . . . . . . . . .19
- 5. GETCOMADDR. . . . . . . . . . . . . . . . . .20
- 6. GETCPU. . . . . . . . . . . . . . . . . . . .20
- 7. GETCPUMODE. . . . . . . . . . . . . . . . . .20
- 8. GETFEATURES . . . . . . . . . . . . . . . . .21
- 9. GETID . . . . . . . . . . . . . . . . . . . .21
- 10. GETLPT . . . . . . . . . . . . . . . . . . .21
- 11. GETLPTADDR . . . . . . . . . . . . . . . . .22
- 12. GETMHZ . . . . . . . . . . . . . . . . . . .22
- 13. GETNPU . . . . . . . . . . . . . . . . . . .22
- 14. GETUART. . . . . . . . . . . . . . . . . . .23
-
- E. MEMORY . . . . . . . . . . . . . . . . . . . . .24
- 1. CHKDPMI . . . . . . . . . . . . . . . . . . .24
- 2. CHKEMS. . . . . . . . . . . . . . . . . . . .24
- 3. CHKVCPI . . . . . . . . . . . . . . . . . . .24
- 4. CHKXMS. . . . . . . . . . . . . . . . . . . .24
- 5. GETAVAILEXT . . . . . . . . . . . . . . . . .25
- 6. GETDPMIV. . . . . . . . . . . . . . . . . . .25
- 7. GETEMM. . . . . . . . . . . . . . . . . . . .25
- 8. GETEMS. . . . . . . . . . . . . . . . . . . .26
- 9. GETEMSI . . . . . . . . . . . . . . . . . . .26
- 10. GETEMSV. . . . . . . . . . . . . . . . . . .27
- 11. GETEXT . . . . . . . . . . . . . . . . . . .27
- 12. GETRAM . . . . . . . . . . . . . . . . . . .27
- 13. GETVCPIV . . . . . . . . . . . . . . . . . .28
- 14. GETXMSA. . . . . . . . . . . . . . . . . . .28
- 15. GETXMSI. . . . . . . . . . . . . . . . . . .28
- 16. GETXMSV. . . . . . . . . . . . . . . . . . .29
-
- F. MOUSE. . . . . . . . . . . . . . . . . . . . . .30
- 1. CHKMOUSE. . . . . . . . . . . . . . . . . . .30
- 2. GETMOUSEI . . . . . . . . . . . . . . . . . .30
- 3. GETMOUSEV . . . . . . . . . . . . . . . . . .30
-
- G. NETWORK . . . . . . . . . . . . . . . . . . . . .32
- 1. CHKIPX. . . . . . . . . . . . . . . . . . . .32
- 2. GETLOGINTIME. . . . . . . . . . . . . . . . .32
- 3. GETNETNAME. . . . . . . . . . . . . . . . . .32
- 4. GETUSERNAME . . . . . . . . . . . . . . . . .33
- 5. NETBIOS . . . . . . . . . . . . . . . . . . .33
- 6. NETSHELL. . . . . . . . . . . . . . . . . . .33
-
- H. TSR'S, DRIVERS AND SHELLS. . . . . . . . . . . .35
- 1. CPTASK. . . . . . . . . . . . . . . . . . . .35
- 2. DBLSPACE. . . . . . . . . . . . . . . . . . .35
- 3. DOSSHELL. . . . . . . . . . . . . . . . . . .35
- 4. GETDESQV. . . . . . . . . . . . . . . . . . .35
- 5. GETWINV . . . . . . . . . . . . . . . . . . .36
-
- - 3 -
-
- 6. HYPERDISK . . . . . . . . . . . . . . . . . .36
- 7. MSCDEX. . . . . . . . . . . . . . . . . . . .37
- 8. NCACHE. . . . . . . . . . . . . . . . . . . .37
- 9. PCCACHE . . . . . . . . . . . . . . . . . . .37
- 10. PCKWIK . . . . . . . . . . . . . . . . . . .37
- 11. SMARTDRV . . . . . . . . . . . . . . . . . .38
- 12. SPACEMAN . . . . . . . . . . . . . . . . . .38
- 13. STACKER. . . . . . . . . . . . . . . . . . .38
- 14. TASKMAX. . . . . . . . . . . . . . . . . . .39
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 4 -
-
- I. INTRODUCTION
-
- The SYSTEM INFO LIBRARY provides over 80 functions which
- access system information such as CPU or display type
- from within a Borland C program. I have included the C
- source and executable for a program that demonstrates most
- of the functions available in the SYSTEM INFO LIBRARY.
-
- 1. What is supported.
-
- Borland C++ v2.0 or higher
-
- Note: This library should work with previous versions
- with little or no modification as well as other
- C compilers but, as of this documentation, it
- has only been tested with Borland C++ v2.0 thru
- Borland C++ v4.0. Please let me know how this
- library works with other versions or compilers
- so that I can update this documentation or make
- changes to the library.
-
- 2. Registration.
-
- It is expected that if you find the SYSTEM INFO LIBRARY
- useful, you will register your copy. You may not use
- SYSTEM INFO LIBRARY functions in programs intended for
- sale unless you have registered. Upon registration,
- you will receive the other four memory models (tiny,
- medium, compact and large). Registered users may then
- distribute programs linked with the SYSTEM INFO LIBRARY
- without further royalties.
-
- 3. Disclaimer
-
- USE THIS LIBRARY AT YOUR OWN RISK. I have made great
- efforts to test this library on as many different
- computers as possible, but, I will not assume any
- responsibility for any problems which this library may
- cause you. If you do run into a problem, please let me
- know about it and I will do my best to respond to it.
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 5 -
-
- II. SYSTEM FUNCTIONS
-
- This section lists all the functions available in the
- SYSTEM INFO LIBRARY as well as a brief description, any
- parameters required or returned and an example of how to
- use the function. Also listed is any hardware or software
- that the function is applicable with as well as any
- hardware or software that must be installed for the
- function to work correctly.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 6 -
-
- A. DISPLAY
-
- 1. GETCRT
-
- Returns the type of display attached to an EGA or
- VGA card.
-
- 0 - Color monitor attached
- 1 - Monochrome monitor attached
-
- usage: ret = getCRT()
-
- argument list: void
-
- return value: int the display type
-
- available on: EGA or higher.
-
- restrictions: none.
-
- 2. GETVESA
-
- Returns if a VESA BIOS extension is installed.
- If installed, then it returns the VESA version
- and total video RAM installed.
-
- usage: ret = getVESA(&major,&minor,&vram)
-
- argument list: int major VESA version
- int minor VESA version
- int vram total video RAM
-
- return value: int if VESA installed
- (1 - Yes, 0 - No)
- available on: VGA display.
-
- restrictions: none.
-
- 3. GETVIDEO
-
- Returns the type of video card installed.
-
- 1 - MDA (Monochrome Display Adapter)
- 2 - HGA (Hercules Graphics Adapter)
- 3 - CGA (Color Graphics Adapter)
- 4 - EGA (Enhanced Graphics Adapter)
- 5 - MCGA (Multi-Color Graphics Array)
- 6 - VGA (Video Graphics Array)
- 7 - XGA (Extended Graphics Adapter)
-
- usage: ret = getVideo()
-
-
- - 7 -
-
- argument list: void
-
- return value: int video card type
-
- available on: all machines.
-
- restrictions: none.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 8 -
-
- B. DOS
-
- 1. CHKANSI
-
- Returns whether ANSI.SYS is installed.
-
- usage: ret = chkAnsi()
-
- argument list: void
-
- return value: int if ANSI.SYS installed
- (1 - Yes, 0 - No)
- available on: DOS 4.0 or higher.
-
- restrictions: none.
-
- 2. CHKAPPEND
-
- Returns whether APPEND is installed.
-
- usage: ret = chkAppend()
-
- argument list: void
-
- return value: int if APPEND installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 3. CHKASSIGN
-
- Returns whether ASSIGN is installed.
-
- usage: ret = chkAssign()
-
- argument list: void
-
- return value: int if ASSIGN installed
- (1 - Yes, 0 - No)
- available on: DOS 3.0 or higher.
-
- restrictions: none.
-
- 4. CHKDISPLAY
-
- Returns whether DISPLAY.SYS is installed.
-
- usage: ret = chkDisplay()
-
- argument list: void
-
-
- - 9 -
-
- return value: int if DISPLAY installed
- (1 - Yes, 0 - No)
- available on: DOS 3.3 or higher.
-
- restrictions: none.
-
- 5. CHKDOSHIGH
-
- Returns whether DOS is loaded high.
-
- usage: ret = chkDosHigh()
-
- argument list: void
-
- return value: int if DOS is loaded high
- (1 - Yes, 0 - No)
- available on: DOS 5.0+ or DR-DOS 6.0+
-
- restrictions: none.
-
- 6. CHKDOSKEY
-
- Returns whether DOSKEY is installed.
-
- usage: ret = chkDoskey()
-
- argument list: void
-
- return value: int if DOSKEY installed
- (1 - Yes, 0 - No)
- available on: DOS 5.0 or higher.
-
- restrictions: none.
-
- 7. CHKDRIVER
-
- Returns whether DRIVER.SYS in installed.
-
- usage: ret = chkDriver()
-
- argument list: void
-
- return value: int if DRIVER installed
- (1 - Yes, 0 - No)
- available on: DOS 3.3 or higher.
-
- restrictions: none.
-
- 8. CHKEGA
-
- Returns whether EGA.SYS in installed.
-
-
- - 10 -
-
- usage: ret = chkEGA()
-
- argument list: void
-
- return value: int if EGA.SYS installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 9. CHKGRAFTABL
-
- Returns whether GRAFTABL is installed.
-
- usage: ret = chkGraftabl()
-
- argument list: void
-
- return value: int if Graftabl installed
- (1 - Yes, 0 - No)
- available on: DOS 3.3 or higher.
-
- restrictions: none.
-
- 10. CHKGRAPHICS
-
- Returns whether GRAPHICS.COM is installed.
-
- usage: ret = chkGraphics()
-
- argument list: void
-
- return value: int if GRAPHICS installed
- (1 - Yes, 0 - No)
- available on: DOS 4.0 or higher.
-
- restrictions: none.
-
- 11. CHKKEYB
-
- Returns whether KEYB.COM is installed.
-
- usage: ret = chkKeyb()
-
- argument list: void
-
- return value: int if KEYB.COM installed
- (1 - Yes, 0 - No)
- available on: DOS 3.3 or higher.
-
- restrictions: none.
-
-
- - 11 -
-
- 12. CHKNLSFUNC
-
- Returns whether NLSFUNC.COM is installed.
-
- usage: ret = chkNlsfunc()
-
- argument list: void
-
- return value: int if NLSFUNC installed
- (1 - Yes, 0 - No)
- available on: DOS 3.3 or higher.
-
- restrictions: none.
-
- 13. CHKPRINT
-
- Returns whether PRINT is installed.
-
- usage: ret = chkPrint()
-
- argument list: void
-
- return value: int if PRINT installed
- (1 - Yes, 0 - No)
- available on: DOS 3.0 or higher.
-
- restrictions: none.
-
- 14. CHKSHARE
-
- Returns whether SHARE.EXE
-
- usage: ret = chkNlsfunc()
-
- argument list: void
-
- return value: int if SHARE installed
- (1 - Yes, 0 - No)
- available on: DOS 3.0 or higher.
-
- restrictions: none.
-
- 15. CHKSHELLB
-
- Returns whether SHELLB.COM
-
- usage: ret = chkShellb()
-
- argument list: void
-
- return value: int if SHELLB installed
- (1 - Yes, 0 - No)
-
- - 12 -
-
- available on: DOS 4.0 or higher.
-
- restrictions: none.
-
- 16. CHKXMA2EMS
-
- Returns whether XMA2EMS.SYS
-
- usage: ret = chkXMA2EMS()
-
- argument list: void
-
- return value: int if XMA2EMS installed
- (1 - Yes, 0 - No)
- available on: DOS 4.0 or higher.
-
- restrictions: none.
-
- 17. GET4DOSV
-
- Returns whether 4DOS is installed. If installed,
- then the 4DOS version is returned.
-
- usage: ret = get4DosV(&major,&minor)
-
- argument list: int major version
- int minor version
-
- return value: int if 4DOS installed
- (1 - Yes, 0 - No)
- available on: 4DOS 1.0 or higher.
-
- restrictions: none.
-
- 18. GETDOSOEM
-
- Returns the DOS OEM number.
-
- usage: ret = getDosOem()
-
- argument list: void
-
- return value: int DOS OEM number
-
- available on: DOS 2.0 or higher.
-
- restrictions: none.
-
- 19. GETDOSV
-
- Returns the DOS version.
-
-
- - 13 -
-
- Note: OS/2 v1.x returns major version 10
- OS/2 v2.x returns major version 20
- DOS 4.01 and 4.02 return version 4.00
- IBM DOS 6.1 returns version 6.0 (use DOS
- OEM number to distinguish it from
- MS-DOS 6.0)
-
- usage: getDosV(&major,&minor)
-
- argument list: int major version
- int minor version
-
- return value: void
-
- available on: all machines.
-
- restrictions: none.
-
- 20. GETDRDOSV
-
- Returns the version I.D. of DR-DOS installed.
-
- 00h - DR-DOS not installed
- 01h - Multi-User DR-DOS
- 60h - DOS Plus
- 63h - DR-DOS 3.41
- 64h - DR-DOS 3.42
- 65h - DR-DOS 5.0
- 67h - DR-DOS 6.0
- 70h - PalmDOS
- 71h - DR-DOS 6.0 (March 1993 Update)
- 72h - Novell DOS 7.0
-
- usage: ret = getDrDosV()
-
- argument list: void
-
- return value: int DR-DOS version I.D.
-
- available on: DR-DOS 3.41 or higher.
-
- restrictions: none.
-
-
-
-
-
-
-
-
-
-
-
- - 14 -
-
- C. DRIVES
-
- 1. CDROM
-
- Returns whether a CD-ROM drive is installed.
- If installed, then the number of CD-ROM drive
- letters and the starting drive letter is returned.
-
- usage: ret = CDROM(&num,drive)
-
- argument list: int num number of drives
- char *drive starting drive letter
-
- return value: int if CD-ROM installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 2. CHKREMOTE
-
- Returns if a given drive remote (networked) or
- local.
- 0 - Local
- 1 - Remote
-
- usage: ret = chkRemote(drive,&remote)
-
- argument list: char *drive letter
- int remote status
- return value: int 0 - if no errors
-
- available on: DOS 3.1 or higher.
-
- restrictions: none.
-
- 3. CHKREMOVABLE
-
- Returns if a given drive is removable or fixed.
-
- 0 - Removable
- 1 - Fixed
-
- usage: ret = chkRemovable(drive,&removable)
-
- argument list: char *drive letter
- int removable status
- return value: int 0 - if no errors
-
- available on: DOS 3.0 or higher.
-
- restrictions: none.
-
- - 15 -
-
- 4. GETAVAILDRVS
-
- Returns the number of available drives.
-
- usage: ret = getAvailDrvs()
-
- argument list: void
-
- return value: int available drives
-
- available on: all machines.
-
- restrictions: none.
-
- 5. GETDRVINFO
-
- Returns various information for a given drive.
-
- usage: ret = getDrvInfo(drive,&cyl,&heads,&sec)
-
- argument list: char *drive letter
- int cyl number of cylinders
- int heads number of heads
- int sec number of sectors
-
- return value: int 0 - if no errors
-
- available on: DOS 3.2 or higher.
-
- restrictions: none.
-
- 6. GETDRVSPACE
-
- Returns various drive space information for a
- given drive.
-
- Cluster Size = Bytes Per Sec * Sectors Per Cluster
- Free Space = Free Clusters * Cluster Size
- Total Space = Total Clusters * Cluster Size
- Used Space = Total Space - Free Space
-
- usage: ret = getDrvSpace(drive,&SecPerClus,
- &FreeClus,&BytesPerSec,
- &TotalClus)
-
- argument list: char *drive letter
- long SecPerClus sec per cluster
- long FreeClu free clusters
- long BytesPerSec bytes per sector
- long TotalClus total clusters
-
- return value: int 0 - if no errors
-
- - 16 -
-
- available on: DOS 2.0 or higher.
-
- restrictions: none.
-
- 7. GETFLOPPY
-
- Returns the number of floppy drives installed.
-
- usage: ret = getFloppy()
-
- argument list: none.
-
- return value: int floppy drives
-
- available on: all machines.
-
- restrictions: none.
-
- 8. GETFLOPTYPE
-
- Returns the drive type for floppy drives A and B.
-
- 0 - No drive installed
- 1 - 360K DD Drive
- 2 - 1.2M HD Drive
- 3 - 720K DD Drive
- 4 - 1.44M HD Drive
- 5 - 2.88M ED Drive
-
- usage: ret = getFlopType(&a,&b)
-
- argument list: int a drive A type
- int b drive B type
-
- return value: int 0 - if no errors
-
- available on: AT or higher. (some XT's)
-
- restrictions: none.
-
- 9. ISCDROM
-
- Returns if a given drive is an MSCDEX CD-ROM
- drive.
-
- Note: This function expects a Microsoft CD-ROM
- extension version 2.00 or higher to be
- installed. Use MSCDEX to ensure that one
- is installed.
-
- usage: ret = iscdrom(drive)
-
-
- - 17 -
-
- argument list: char *drive letter
-
- return value: int if drive is a CD-ROM
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: CD-ROM extension 2.00 or higher.
-
- 10. ISDBLSPACE
-
- Returns if a given drive is a DBLSPACE compressed
- drive.
-
- Note: This function expects DBLSPACE.BIN to be
- installed. Use chkDblSpace() to ensure
- that it is installed.
-
- usage: ret = isdblspace(drive)
-
- argument list: char *drive letter
-
- return value: int if a DBLSPACE drive
- (1 - Yes, 0 - No)
- available on: DOS 6.0 or higher.
-
- restrictions: DBLSPACE.BIN must be installed.
-
- 11. ISSTACKER
-
- Returns if a given drive is a Stacker compressed
- drive.
-
- usage: ret = isstacker(drive)
-
- argument list: char *drive letter
-
- return value: int if a Stacker drive
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
-
-
-
-
-
-
-
-
-
-
-
- - 18 -
-
- D. HARDWARE
-
- 1. BIOSDATE
-
- Returns a string containing the BIOS date.
-
- usage: ret = biosDate()
-
- argument list: void
-
- return value: char* BIOS date
-
- available on: all machines.
-
- restrictions: none.
-
- 2. CHKENHKEYB
-
- Returns if an enhanced 101-Key keyboard is
- detected.
-
- usage: ret = chkEnhKeyB()
-
- argument list: void
-
- return value: int if enhanced keyboard
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 3. GETBUSTYPE
-
- Returns the system bus type.
-
- 1 - ISA/AT
- 2 - MCA
- 3 - EISA
-
- usage: ret = getBusType()
-
- argument list: void
-
- return value: int bus type
-
- available on: all machines.
-
- restrictions: none.
-
- 4. GETCOM
-
- Returns the number of serial ports installed.
-
- - 19 -
-
- usage: ret = getCOM()
-
- argument list: void
-
- return value: int serial ports
-
- available on: all machines.
-
- restrictions: none.
-
- 5. GETCOMADDR
-
- Returns the address for a serial port (1-4).
-
- usage: ret = getCOMaddr(&port)
-
- argument list: int port number
-
- return value: int port address
-
- available on: all machines.
-
- restrictions: none.
-
- 6. GETCPU
-
- Returns the type of CPU installed.
-
- 1 - NEC V20 or V30
- 2 - 8088 or 8086
- 3 - 80186
- 4 - 80286
- 5 - 80386
- 6 - 80486
- 7 - PENTIUM
-
- usage: ret = getCPU()
-
- argument list: void
-
- return value: int CPU type
-
- available on: all machines.
-
- restrictions: none.
-
- 7. GETCPUMODE
-
- Returns the CPU mode.
-
- 0 - Not supported
- 1 - Real
-
- - 20 -
-
- 2 - Protected
- 3 - V86
-
- usage: ret = getCPUmode()
-
- argument list: void
-
- return value: int CPU mode
-
- available on: 80286 or higher
-
- restrictions: none.
-
- 8. GETFEATURES
-
- Returns various information from the BIOS feature
- byte.
-
- usage: ret = getFeatures(&DMA3,&s8259,&realtime,
- &keyint,&extint,&extbios,&mca)
-
- argument list: int DMA3 DMA chan 3 used by HD
- int s8259 2nd 8259 installed
- int realtime real-time clock
- int keyint INT 15/AH=4Fh avail
- int extint INT 15/AH=41h avail
- int extbios extended BIOS area
- int mca Micro Channel bus
-
- return value: int 0 - if supported
- 1 - if not supported
- available on: all machines.
-
- restrictions: none.
-
- 9. GETID
-
- Returns the model, submodel and revision I.D.
-
- usage: getID(&model,&submodel,&rev)
-
- argument list: int model BIOS model I.D.
- int submodel BIOS submodel I.D.
- int rev BIOS revision level
-
- return value: void
-
- available on: all machines.
-
- restrictions: none.
-
- 10. GETLPT
-
- - 21 -
-
- Returns the number of parallel ports installed.
-
- usage: ret = getLPT()
-
- argument list: void
-
- return value: int parallel ports
-
- available on: all machines.
-
- restrictions: none.
-
- 11. GETLPTADDR
-
- Returns the address of a parallel port (1-4).
-
- usage: ret = getLPTaddr(&port)
-
- argument list: int port number
-
- return value: int port address
-
- available on: all machines.
-
- restrictions: none.
-
- 12. GETMHZ
-
- Returns the CPU speed in Mhz.
-
- usage: ret = getMhz()
-
- argument list: void
-
- returns value: int CPU speed
-
- available on: all machines
-
- restrictions: none.
-
- 13. GETNPU
-
- Returns the type of math co-processor installed.
-
- 0 - Math co-processor not installed
- 1 - 8087
- 2 - 80287
- 3 - 80387
- 4 - 80487
- 5 - PENTIUM
-
- usage: ret = getNPU()
-
- - 22 -
-
- argument list: void
-
- return value: int co-processor type
-
- available on: all machines.
-
- restrictions: none.
-
- 14. GETUART
-
- Return the type of UART installed for a serial
- port address.
-
- 0 - not installed
- 1 - 8250
- 2 - 8250A or 16450
- 3 - 16C1450
- 4 - 16550
- 5 - 16550AF/C/CF
- 6 - 16C550
- 7 - 16552
- 8 - 82510
-
- usage: ret = getUART(&addr)
-
- argument list: int address
-
- return value: int UART type
-
- available on: all machines.
-
- restrictions: none.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 23 -
-
- E. MEMORY
-
- 1. CHKDPMI
-
- Returns whether a DOS Protected Mode Interface
- is installed.
-
- usage: ret = chkDPMI()
-
- argument list: void
-
- return value: int if DPMI installed
- (1 - Yes, 0 - No)
- available on: 80286 or higher.
-
- restrictions: none.
-
- 2. CHKEMS
-
- Returns whether an Expanded Memory Manager is
- installed.
-
- usage: ret = chkEMS()
-
- argument list: void
-
- return value: int if EMS installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 3. CHKVCPI
-
- Returns whether a Virtual Control Program
- Interface is installed.
-
- usage: ret = chkVCPI()
-
- argument list: void
-
- return value: int if VCPI installed
- (1 - Yes, 0 - No)
- available on: 80386 or higher.
-
- restrictions: '386 Extended Memory Manager
- installed
-
- 4. CHKXMS
-
- Returns whether an Extended Memory Manager is
- installed.
-
- - 24 -
-
- usage: ret = chkXMS()
-
- argument list: void
-
- return value: int if XMS installed
- (1 - Yes, 0 - No)
- available on: 80286 or higher.
-
- restrictions: none.
-
- 5. GETAVAILEXT
-
- Returns the amount of available extended memory.
-
- usage: ret = getAvailExt()
-
- argument list: void
-
- return value: long avail extended memory
-
- available on: 80286 or higher.
-
- restrictions: none.
-
- 6. GETDPMIV
-
- Returns the DPMI version.
-
- Note: This function expects a DPMI to be
- installed. Use chkDPMI() to ensure that a
- DPMI is installed.
-
- usage: ret = getDPMIv(&major,&minor)
-
- argument list: int major version
- int minor version
-
- return value: int 0 - if no errors
- 1 - if errors
- available on: 80286 or higher.
-
- restrictions: DPMI driver installed.
-
- 7. GETEMM
-
- Returns '386 Extended Memory Manager type. This
- function expects an Extended Memory Manager to be
- installed. Use chkXMS() to ensure that an
- Extended Memory Manager is installed.
-
- Note: This function expects an XMS Memory Manager
-
-
- - 25 -
-
- to be installed. Use chkXMS() to ensure
- that one is installed.
-
- 0 - Not installed or unknown Memory-Manager
- 1 - Quadtel's QMAPS and Hewlett-Packard's HPMM.SYS
- 2 - Microsoft's EMM386.EXE
- 3 - Windows 3.x WIN386.EXE
- 4 - DR-DOS 6.0 EMM386.SYS
- 5 - Qualitas' 386MAX
- 6 - V Communication's Memory Commander
- 7 - Quarterdeck's QEMM-386
- 8 - Helix's Netroom RM386
-
- usage: ret = getEMM()
-
- argument list: void
-
- return value: int '386 Memory Manager type
-
- available on: 80386 or higher.
-
- restrictions: XMS memory manager installed.
-
- 8. GETEMS
-
- Returns the total and available 16K pages of EMS
- memory.
-
- Note: This function expects an EMS Memory Manager
- to be installed. Use chkEMS() to ensure
- that one is installed.
-
- usage: ret = getEMS(&total,&avail)
-
- argument list: int total 16K pages
- int avail available 16K pages
-
- return value: int 0 - if no errors
-
- available on: all machines.
-
- restrictions: EMS memory manager installed.
-
- 9. GETEMSI
-
- Returns the number of available EMS handles and
- the page frame address.
-
- Note: This function expects an EMS memory manager
- to be installed. Use chkEMS() to ensure
- that one is installed.
-
-
- - 26 -
-
- usage: ret = getEMSi(&handles,&address)
-
- argument list: int handles available handles
- int address page frame address
-
- return value: int 0 - if no errors
-
- available on: all machines.
-
- restrictions: EMS memory manager installed.
-
- 10. GETEMSV
-
- Returns the EMS memory manager version.
-
- Note: This function expects an EMS memory manager
- to be installed. Use chkEMS() to ensure
- that one is installed.
-
- usage: ret = getEMSv(&major,&minor)
-
- argument list: int major EMS major version
- int minor EMS minor version
-
- return value: int 0 - if no errors
-
- available on: all machines.
-
- restrictions: EMS memory manager installed.
-
- 11. GETEXT
-
- Returns the total amount of extended memory
- installed.
-
- usage: ret = getEXT()
-
- argument list: void
-
- return value: long total extended memory
-
- available on: 80286 or higher.
-
- restrictions: none.
-
- 12. GETRAM
-
- Returns the total amount of conventional memory
- installed.
-
- usage: ret = getRAM()
-
-
- - 27 -
-
- argument list: void
-
- return value: int conventional memory
-
- available on: all machines.
-
- restrictions: none.
-
- 13. GETVCPIV
-
- Returns the VCPI version.
-
- Note: This routine expects a VCPI driver to be
- installed. Use chkVCPI() to ensure that
- one is installed.
-
- usage: getVCPIv(&major,&minor)
-
- argument list: int major VCPI major version
- int minor VCPI minor version
-
- return value: void
-
- available on: 80386 or higher.
-
- restrictions: VCPI driver installed.
-
- 14. GETXMSA
-
- Returns the total available XMS memory and the
- largest available block.
-
- Note: This function expects an XMS Memory Manager
- to be installed. Use chkXMS() to ensure
- that one is installed.
-
- usage: ret = getXMSa(&total,&avail)
-
- argument list: long total available XMS memory
- long avail largest XMS block
-
- return value: int 0 - if no errors
- 1 - if errors
- available on: 80286 or higher.
-
- restrictions: XMS memory manager installed.
-
- 15. GETXMSI
-
- Returns if HMA exists and A20 status.
-
-
-
- - 28 -
-
- 0 - HMA does not exist
- 1 - HMA exists
-
- 0 - A20 disabled
- 1 - A20 enabled
-
- Note: This function expects an XMS Memory Manager
- to be installed. Use chkXMS() to ensure
- that one is installed.
-
- usage: ret = getXMSi(&HMA,&A20)
-
- argument list: int HMA status
- int A20 status
-
- return value: int 0 - if no errors
- 1 - if errors
- available on: 80286 or higher.
-
- restrictions: XMS memory manager installed.
-
- 16. GETXMSV
-
- Returns XMS memory manager version.
-
- Note: This function expects an XMS Memory Manager
- to be installed. Use chkXMS() to ensure
- that one is installed.
-
- usage: ret = getXMSv(&major,&minor)
-
- argument list: int major XMS major version
- int minor XMS minor version
-
- return value: int 0 - if no errors
- 1 - if errors
- available on: 80286 or higher.
-
- restrictions: XMS memory manager installed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 29 -
-
- F. MOUSE
-
- 1. CHKMOUSE
-
- Returns the number of mouse buttons, zero if
- a mouse is not installed.
-
- usage: ret = chkMouse()
-
- argument list: void
-
- return value: int number of buttons
-
- available on: all machines.
-
- restrictions: none.
-
- 2. GETMOUSEI
-
- Returns the type of mouse and IRQ.
-
- Type:
- 1 - Bus mouse
- 2 - Serial mouse
- 3 - Inport mouse
- 4 - PS/2 mouse
- 5 - Hewlett-Packard mouse
-
- IRQ:
- PS/2 mouse returns an IRQ of 0.
-
- Note: This routine expects a mouse driver
- to be installed. Use chkMouse() to
- ensure that one is installed.
-
- usage: getMouseI(&type,&irq)
-
- argument list: int type mouse type
- int irq mouse IRQ
-
- return value: void
-
- available on: all machines.
-
- restrictions: Microsoft or compatible mouse
- driver.
-
- 3. GETMOUSEV
-
- Returns the mouse driver version.
-
-
-
- - 30 -
-
- Note: This routine expects a mouse driver
- to be installed. Use chkMouse() to
- ensure that one is installed.
-
- usage: getMouseV(&major,&minor)
-
- argument list: int major version
- int minor version
-
- return value: void
-
- available on: all machines.
-
- restrictions: Microsoft or compatible mouse
- driver.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 31 -
-
- G. NETWORK
-
- 1. CHKIPX
-
- Returns whether Novell NetWare IPX installed.
-
- usage: ret = chkIPX()
-
- argument list: void
-
- return value: int if IPX installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 2. GETLOGINTIME
-
- Returns login date, time and day of the week.
-
- usage: ret = getLoginTime(&year,&month,&day,
- &hour,&min,&sec,&weekday)
-
- argument list: int year (80-99 = 1980-1999)
- (00-79 = 2000-2079)
- int month (1-12)
- int day (1-31)
- int hour (0-23)
- int min (0-59)
- int sec (0-59)
- int weekday (0 = Sunday)
-
- return value: int 0 - no errors
-
- available on: Advanced NetWare 1.0 or higher.
-
- restrictions: none.
-
- 3. GETNETNAME
-
- Returns the Novell NetWare file server name and
- various file server information.
-
- usage: ret = getNetName(&ver,&sub,&conn,&use,
- &vol,&peak)
-
- argument list: int ver NetWare version
-
- int sub NetWare subversion
- int conn connections supported
- int use connections in use
-
-
- - 32 -
-
- int vol maximum volumes
- int peak connections used
-
- return value: char * server name
-
- available on: Advanced NetWare 2.1 or higher.
-
- restrictions: none.
-
- 4. GETUSERNAME
-
- Returns the Novell NetWare network user name.
-
- usage: ret = getUserName()
-
- argument list: void
-
- return value: char * network user name
-
- available on: Advanced NetWare 1.0 or higher.
-
- restrictions: none.
-
- 5. NETBIOS
-
- Returns whether Novell's NetBIOS emulator is
- installed.
-
- usage: ret = NetBIOS()
-
- argument list: void
-
- return value: int if NetBIOS installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 6. NETSHELL
-
- Returns whether Novell NetWare Shell installed.
- If installed, then the shell version and type
- are returned.
-
- type - shell type (v3.01+)
- 0 - conventional memory
- 1 - expanded memory
- 2 - extended memory
-
- usage: ret = NetShell(&major,&minor,&rev,&type)
-
-
-
- - 33 -
-
- argument list: int major version
- int minor version
- int rev revision
- int type shell type
-
- return value: int if NetShell installed
- (1 - Yes, 0 - No)
- available on: Advanced NetWare 1.0 or higher.
-
- restrictions: none.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 34 -
-
- H. TSR'S, DRIVERS, SHELLS and TASK SWAPPERS
-
- 1. CPTASK
-
- Returns whether PCTools V8.0 or higher CPTASK
- is resident.
-
- usage: ret = CPTask()
-
- argument list: void
-
- return value: int if CPTask resident
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 2. DBLSPACE
-
- Returns whether DOS 6.0 DBLSPACE is installed.
-
- usage: ret = DblSpace()
-
- argument list: void
-
- return value: int if DBLSPACE installed
- (1 - Yes, 0 - No)
- available on: DOS 6.0 or higher.
-
- restrictions: none.
-
- 3. DOSSHELL
-
- Returns whether DOS 5.0 or higher DOSSHELL task
- switcher is resident.
-
- Note: This check is also supported by PCTools
- CPTASK v8.0+ and DR-DOS 6.0 TaskMax.
-
- usage: ret = DosShell()
-
- argument list: void
-
- return value: int if DOSSHELL resident
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 4. GETDESQV
-
- Returns whether DESQview is running. If
-
- - 35 -
-
- running, then the DESQview version is
- returned.
-
- usage: ret = getDesqV(&major,&minor)
-
- argument list: int major version
- int minor version
-
- return value: int if DESQview running
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 5. GETWINV
-
- Returns whether Windows 3.0 or higher is
- running. If running, then the version
- and model are returned.
-
- Mode: 0 - Standard (or Real on Windows 3.0)
- 1 - Enhanced
-
- Note: Will detect Windows/386 2.x but only returns
- the major version.
-
- usage: ret = getWinV(&major,&minor,&mode)
-
- argument list: int major version
- int minor version
- int mode Windows mode
-
- return value: int if Windows running
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 6. HYPERDISK
-
- Returns whether HyperDisk disk cache v4.20+
- or higher is installed.
-
- usage: ret = HyperDisk()
-
- argument list: void
-
- return value: int if HyperDisk installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- - 36 -
-
- 7. MSCDEX
-
- Returns whether a Microsoft CD-ROM extension
- version 2.00 or higher installed. If installed,
- then the version is returned.
-
- usage: ret = MSCDEX(&major,&minor)
-
- argument list: int major version
- int minor version
-
- return value: int if MSCDEX installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 8. NCACHE
-
- Returns whether Norton NCACHE v5.0 or higher
- is installed.
-
- usage: ret = Ncache()
-
- argument list: void
-
- return value: int if NCACHE installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 9. PCCACHE
-
- Returns whether PCTools PC-Cache v6.x or
- PC-Cache v7.x is installed.
-
- usage: ret = PcCache()
-
- argument list: void
-
- return value: int if PC-Cache installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 10. PCKWIK
-
- Returns whether PC-Kwik v3.20 or higher
- disk cache is installed.
-
-
- - 37 -
-
- Note: PC-Cache v5.x and Qcache v4.00 are
- OEM versions of PC-Kwik v3.20.
-
- usage: ret = PCKwik()
-
- argument list: void
-
- return value: int if PC-Kwik installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 11. SMARTDRV
-
- Returns whether SMARTDrive disk cache is
- installed.
-
- Note: Also returns if PC-Cache v8.0 or higher
- is installed.
-
- usage: ret = SmartDrv()
-
- argument list: void
-
- return value: int if SMARTDrive installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 12. SPACEMAN
-
- Returns whether Vertisoft SPACEMANager
- (DoubleSpace enhancement) is installed.
-
- usage: ret = SpaceMan()
-
- argument list: void
-
- return value: int if SPACEMANager installed
- (1 - Yes, 0 - No)
- available on: DOS 6.0 or higher and DoubleSpace
-
- restrictions: none.
-
-
- 13. STACKER
-
- Returns whether Stacker disk compression
- is installed.
-
-
- - 38 -
-
- usage: ret = Stacker()
-
- argument list: void
-
- return value: int if Stacker installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
- 14. TASKMAX
-
- Returns whether DR-DOS 6.0 TaskMax task swapper
- is resident.
-
- usage: ret = TaskMax()
-
- argument list: void
-
- return value: int if TaskMax installed
- (1 - Yes, 0 - No)
- available on: all machines.
-
- restrictions: none.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 39 -
-
-